package com.oh.iris.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;

/**
 * Entity基类
 *
 * @author 王小费
 *
 */
public abstract class BaseEntity {
    /**
     * id
     */
    @TableId
    private Long id;

    /**
     * 创建者
     */
    @TableField(fill = FieldFill.INSERT)
    private Long  creator;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新者
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long  updater;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 删除标记
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    public void setId(Long id){
        this.id = id;
    }

    public Long getId(){
        return this.id;
    }

    public void setCreator(Long creator){
        this.creator = creator;
    }
    public Long getCreator(){
        return this.creator;
    }

    public void setUpdater(Long updater){
        this.updater = updater;
    }

    public Long getUpdater(){
        return this.updater;
    }

    public void setCreateTime(Date createTime){
        this.createTime =createTime;
    }

    public Date getCreateTime(){
        return this.createTime;
    }

    public void setUpdateTime(Date updateTime){
        this.updateTime = updateTime;
    }
    public Date getUpdateTime(){
        return this.updateTime;
    }

    public void setDeleted(Integer deleted){
        this.deleted = deleted;
    }

    public Integer getDeleted(){
        return this.deleted;
    }
}
